<?php


namespace app\api\controller;


use app\common\logic\RegionLogic;

class RegionController extends BaseShopController
{
    public array $notNeedLogin = ['region','city'];

    /**
     * @notes 地区
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     * @author ljj
     * @date 2022/4/6 10:51 上午
     */
    public function region()
    {
        $result = (new RegionLogic())->region();
        return $this->success('获取成功',$result);
    }

    /**
     * @notes 地级市列表
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     * @author ljj
     * @date 2022/4/6 2:41 下午
     */
    public function city()
    {
        $result = (new RegionLogic())->city();
        return $this->success('获取成功',$result);
    }
}